﻿@{ var CurentMenuPower = ViewBag.CurentMenuPower;
    Dictionary<string, string> fun = Model.FunDictionary;
    var MenuKey = Model.MenuKey;

    foreach (var item in fun.Keys)
    {
        //var funModel = LS.Project.Helper.ContainerBuilderHelper.Instance.GetFunction(item);

        if ((CurentMenuPower.ContainsKey(MenuKey) && CurentMenuPower[MenuKey].Contains(item)) || ViewBag.UserId == 999999)
        {
            switch (item)
            {
                case "Delete":
                    <button class="pear-btn pear-btn-danger pear-btn-xs btn-toolbar-fs" id="btn_@(Model.Num)_@(item)" lay-event="@item">
                        @fun[item]
                    </button>
                    break;
                case "More":
                    <button class="pear-btn pear-btn-primary pear-btn-xs btn-toolbar-fs btnmore" lay-event="@item">
                        更多
                        <i class="layui-icon layui-icon-down layui-font-12"></i>
                    </button>
                    break;
                default:
                    <button class="pear-btn pear-btn-primary pear-btn-xs btn-toolbar-fs" id="btn_@(Model.Num)_@(item)" lay-event="@item">
                        @fun[item]
                    </button>
                    break;
            }
        }
    }
}

